package ooday05_enum;

public class EnumTest {
    public static void main(String[] args) {
        //
        Seasons s=Seasons.SPRING;
        System.out.println(s.getSeasonmonth()+","+s.getSeasonName()+","+s.getSeasonDesc());
        System.out.println("--------------------------");

        Seasons[] seasons=Seasons.values();//获取枚举数组,该方法是静态方法
        for (int i=0;i< seasons.length;i++){
            System.out.println(seasons[i]);//SPRING
            System.out.println(seasons[i].getSeasonName());//春天
            System.out.println(seasons[i].getSeasonmonth());//3月
            System.out.println(seasons[i].getSeasonDesc());//春暖花开
        }
    }
}
